<%@ include file="header.jsp" %>

<h1>Vente de <i>${requestScope.produit.intitule}</i></h1>

<div class="infosVente">
	<div class="detailsInfosVente">
		<div style="padding-right : 0px; float : left;">
			<img src="images/${requestScope.produit.photo}" class="image_small" />
		</div>
		<div style="margin-left : 173px;">
			<h2>Description produit</h2>
				
			<b>Type : </b><c:out value="${requestScope.produit.type}" /><br />
			<b>Description : </b><c:out value="${requestScope.produit.description}" /><br />
		
			<h2>Description de l'annonce</h2>
			<b>Prix par produit : <c:out value="${vente.prix}" /> &euro;<br /></b>
			${requestScope.annonce.commentaire}<br />
			<b>Quantit&eacute; : </b>${vente.stock}<br />
			<b>Etat : </b><c:out value="${annonce.etat}" /><br /><br />
			<b>PRIX : ${vente.prix*vente.stock} &euro;</b>
		</div>
		<br /><a href="valide_vente?vente=${vente.idVente}" title="Valider la transaction">Valider la transaction</a></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="Valider la transaction" />Annuler la transaction</a>
	</div>
</div>

<br style="cleat : both" />

<div class="infosAcheteur">
	<h2>Acheteur</h2>
	<div class="cadreAvatar">
		<img src="/MiniIBay/images/avatars/${requestScope.acheteur.avatar}" class="avatar_message" alt="Avatar du membre" />
	</div>
	<b>${requestScope.acheteur.pseudo}</b> (${requestScope.acheteur.prenom} ${requestScope.acheteur.nom})<br />
	<br />
	<b>Adresse : </b><br />
	${requestScope.acheteur.numRue} ${requestScope.acheteur.rue}<br />
	${requestScope.acheteur.codePostal} ${requestScope.acheteur.ville}
	<br /><br />
	<b>Contacts : </b>
	${requestScope.acheteur.telephone}<br />
	${requestScope.acheteur.mail}<br />
</div>

<div class="infosVendeur">
	<h2>Vendeur</h2>
	<div class="cadreAvatar">
		<img src="/MiniIBay/images/avatars/${requestScope.vendeur.avatar}" class="avatar_message" alt="Avatar du membre" />
	</div>
	<b>${requestScope.vendeur.pseudo}</b> (${requestScope.vendeur.prenom} ${requestScope.vendeur.nom})<br />
	<br />
	<b>Adresse : </b><br />
	${requestScope.vendeur.numRue} ${requestScope.vendeur.rue}<br />
	${requestScope.vendeur.codePostal} ${requestScope.vendeur.ville}
	<br /><br />
	<b>Contacts : </b>
	${requestScope.vendeur.telephone}<br />
	${requestScope.vendeur.mail}<br />
</div>
<br style="clear : both" />
<br />
<div class="barreGrise">
	<div class="gauche">Questions / R&eacute;ponse</div>
	<div class="droite"><a href="Annonce?annonce=${requestScope.annonce.idAnnonce}#question">Poser une question</a></div>
</div>
<br />
<c:forEach var="message" items="${requestScope.messages}" >
	<div class="message" style="background-color : ${message.couleur}">
		<div class="cadreAvatar">
			<img src="/MiniIBay/images/avatars/${message.avatarMembre}" class="avatar_message" alt="Avatar du membre" />
		</div>
		<div style="float : left;">
			<b>${message.pseudoMembre}</b><br />
			<p class="infosSmall">${message.date}</p>
			${message.message}
		</div>
		<br style="clear : both" />
	</div>
</c:forEach>
<form name="posterQuestion" id="poserQuestion" method="post" action="poserQuestionVente">
	<fieldset>
		<legend>Posez votre question</legend>
		<a name="question"></a>
		<p class="double">
			<span class="gauche">
				<label for="desc">Question : </label>
				<span class="correction" id="desc-correction"></span>
				<span class="info" id="desc-info"></span>
			</span>
			<span class="droite">
				<textarea name="desc" onfocus="javascript:afficheInfo('desc-info')"  onblur="javascript:verifValeurTextarea('desc', 'poserQuestionVente')" ></textarea>
				<span id="desc-valid" class="correction">&nbsp;</span>
			</span>
		</p>
		<p class="simple">
			<input type="hidden" name="idvente" value="${requestScope.vente.idVente}" />
			<input type="submit" value="Envoyer" />
		</p>
	</fieldset>
</form>
<%@ include file="footer.jsp" %>